<?php
class Registry {

    private $data;

    public function __construct($data = array()){
        $this->data = $data;
    }

    public function merge($data){
        $this->data = array_merge($this->data, $data);
    }
	public function get($key) {
		return (isset($this->data[$key]) ? $this->data[$key] : NULL);
	}

	public function set($key, $value) {
		$this->data[$key] = $value;
	}

	public function rm($key) {
        unset($this->data[$key]);
	}

	public function has($key) {
    	return isset($this->data[$key]);
  	}
}
?>
